package com.GatherFour;

import java.io.Serializable;

public class Player implements Serializable, Comparable<Player>{
	private boolean isHost = false;
	public static final int FULL = 1000;
	public static final int SERVER = 1001;
	public static final int CLIENT = 1002;
	public String name;
	public int playerID;
	public String targetAddr;
	public String[] clientAddrs = new String[3];
	public int score = 100;
	
	public Player(){
		
	}
	
	public Player(String name){
		this.name = name;
	}
	
	public void setHostPlayer(){
		isHost = true;
	}
	
	public void setClientPlayer(){
		isHost = false;
	}
	
	public boolean isHostPlayer(){
		return isHost;
	}

	@Override
	public int compareTo(Player player) {
		// TODO Auto-generated method stub
		if(this.score > player.score)
			return 1;
		else if(this.score < player.score)
			return -1;
		else
			return 0;
	}
}

